<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>xiaosi</title>
</head>
<body>
    <script>
        // const one = (null || false || NaN)
        // const two = (null || 0 || "")
        // const three = ({} || 0 || [])
        // console.log(one,two, three)
        // async function getData() {
        //     return  Promise.resolve("i do")
        //   }
        //   const data = getData();
        //   console.log(data)
        // let string1 = 'dasda'
        // console.log(string1.split('').map(item=>{
        //     console.log(item.includes('a'))
        // }))
        // let proxy = new Proxy({},{
        //     get:function(target, propKey){
        //         return 35;
        //     },
        //     set:function(target, propKey){
        //        console.log('dasdasda')
        //     }
        // })
        // console.log(proxy.time = 1)
        export default function useTitle(){
            const [ideal, setIdeal] = useState('I have a idea')
            const [isSuccess, setSuccess] = useState(false)
            const ifYouDo = useMemo(()=>{
                console.log(isSuccess)
            })
            const showIdeal = (e) =>{
                return <div>{e}</div>
            }
            return {
                ideal,
                showIdeal,
                isSuccess
            }
        }
        //app.js
        const {ideal,showIdeal,isSuccess} = useTitle()
    </script>
</body>
</html>